<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="google" content="notranslate">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>{{.OptionTitle}}</title>
  <link rel="shortcut icon" href="favicon.ico"/>
  {{ if .DebugMode }}
  <link rel="stylesheet" href="/assets/css/base.css">
  <link rel="stylesheet" href="/assets/css/home/search.css">
  <link rel="stylesheet" href="/assets/css/home/hero.css">
  <link rel="stylesheet" href="/assets/css/home/apps.css">
  <link rel="stylesheet" href="/assets/css/home/bookmarks.css">
  <link rel="stylesheet" href="/assets/css/home/toolbar.css">
  {{ else }}
  <style type="text/css">{{.PageInlineStyle}}</style>
  {{ end }}
  <meta name="description" content="Flare - self-hosted startpage for your server"/>
</head>
<body style="{{.PageAppearance}}" class="{{.BodyClassName}}">
  <div class="pageview" id="page-home">
    <div class="container no-select">

      {{ if .ShowSearchComponent }}
      <div class="module-container" id="search-container">
        <form action="/" method="POST">
          {{ if .DisabledSearchAutoFocus }}
          <input type="text" name="search" id="search" autocomplete="off" placeholder="{{.SearchKeyword}}"/>
          {{ else }}
          <input type="text" name="search" id="search" autocomplete="off" autofocus placeholder="{{.SearchKeyword}}"/>
          {{ end}}
          {{ if .HasKeyword }}
          <a href="/">>> TIPS: 点此标签或再次敲击回车，返回首页</a>
          {{ end }}
          <label for="search" id="search-label">书签太多？试试搜索你想寻找的书签吧 :)</label>
        </form>
      </div>
      {{ end }}

      <div class="module-container" id="hero-container">
        <div id="plugin-datetime">
          {{ if .OptionShowDateTime }}
          <p>
            <span>{{.HeroDate}}</span> <span>{{.HeroDay}}</span> <span>{{.HeroTime}}</span>
          </p>
          {{ end }}
          {{ if .OptionShowTitle }}
          <h1 class="plugin-container" id="plugin-greetings">{{.Greetings}}</h1>
          {{ end }}
        </div>

        {{ if .OptionShowTitle }}
        {{ if .ShowWeatherModule }}
        <div class="plugin-container clearfix" id="plugin-weather">
          <div class="pull-left">
            {{.WeatherIcon}}
          </div>
          <div class="pull-right weather-value-container">
            <p>{{.WeatherData.Degree}}°C</p>
            <p>{{.WeatherData.Humidity}}%</p>
          </div>
        </div>
        {{ end }}
        {{ end }}
      </div>

      {{ if .SubPage }}
      <div class="sub-page-header">
        <h1>{{.PageName}}</h1>
        <p><a href="/">返回</a></p>
      </div>
      {{ end }}

      {{ if .OptionShowApps }}
      <div class="plugin-container" id="container-apps">
        <h2><a href="{{.ApplicationsURI}}">应用</a></h2>
        
        <div class="apps-container clearfix">
          {{.Applications}}
        </div>
      </div>
      {{ end }}

      {{ if .OptionShowBookmarks }}
      <div class="plugin-container clearfix" id="container-bookmakrs">
        <h2><a href="{{.BookmarksURI}}">书签</a></h2>
        {{.Bookmarks}}
      </div>
      {{ end }}

      <div class="toolbar-container">
        {{ if .OptionHideSettingsButton }}
        {{ else }}
        <div class="toolbar-btn-bg toolbar-btn-settings">
          <a href="{{.SettingsURI}}" id="btn-open-settings" alt="Settings">
            <span>Open Settings</span>
            <svg viewBox="0 0 24 24" width="24">
              <path
                d="M12,15.5A3.5,3.5 0 0,1 8.5,12A3.5,3.5 0 0,1 12,8.5A3.5,3.5 0 0,1 15.5,12A3.5,3.5 0 0,1 12,15.5M19.43,12.97C19.47,12.65 19.5,12.33 19.5,12C19.5,11.67 19.47,11.34 19.43,11L21.54,9.37C21.73,9.22 21.78,8.95 21.66,8.73L19.66,5.27C19.54,5.05 19.27,4.96 19.05,5.05L16.56,6.05C16.04,5.66 15.5,5.32 14.87,5.07L14.5,2.42C14.46,2.18 14.25,2 14,2H10C9.75,2 9.54,2.18 9.5,2.42L9.13,5.07C8.5,5.32 7.96,5.66 7.44,6.05L4.95,5.05C4.73,4.96 4.46,5.05 4.34,5.27L2.34,8.73C2.21,8.95 2.27,9.22 2.46,9.37L4.57,11C4.53,11.34 4.5,11.67 4.5,12C4.5,12.33 4.53,12.65 4.57,12.97L2.46,14.63C2.27,14.78 2.21,15.05 2.34,15.27L4.34,18.73C4.46,18.95 4.73,19.03 4.95,18.95L7.44,17.94C7.96,18.34 8.5,18.68 9.13,18.93L9.5,21.58C9.54,21.82 9.75,22 10,22H14C14.25,22 14.46,21.82 14.5,21.58L14.87,18.93C15.5,18.67 16.04,18.34 16.56,17.94L19.05,18.95C19.27,19.03 19.54,18.95 19.66,18.73L21.66,15.27C21.78,15.05 21.73,14.78 21.54,14.63L19.43,12.97Z"
                style="fill: var(--color-background);"></path>
            </svg>
          </a>  
        </div>
        {{ end }}
        {{ if .OptionHideHelpButton }}
        {{ else }}
        <div class="toolbar-btn-bg toolbar-btn-help">
          <a href="/help" id="btn-open-help" alt="Help">
            <span>Help</span>
            <svg viewBox="0 0 24 24" width="24">
              <path
                d="M15.07,11.25L14.17,12.17C13.45,12.89 13,13.5 13,15H11V14.5C11,13.39 11.45,12.39 12.17,11.67L13.41,10.41C13.78,10.05 14,9.55 14,9C14,7.89 13.1,7 12,7A2,2 0 0,0 10,9H8A4,4 0 0,1 12,5A4,4 0 0,1 16,9C16,9.88 15.64,10.67 15.07,11.25M13,19H11V17H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12C22,6.47 17.5,2 12,2Z"
                style="fill: var(--color-background);"></path>
            </svg>
          </a>  
        </div>
        {{ end }}
      </div>


      <div class="footer-container">
        {{.OptionFooter}}
      </div>

    </div>
  </div>


</body>
</html>